package com.dao.impl;

import com.dao.EnterpriseDao;
import com.entry.Enterprise;
import com.util.DBHelper;

import java.util.ArrayList;

public class EnterpriseDaoImpl implements EnterpriseDao {
    private DBHelper db=new DBHelper();
    @Override
    public ArrayList<Enterprise> selectAll() {
        String sql="select * from enterprise";
        return db.selectinfo(sql,Enterprise.class);
    }

    @Override
    public Enterprise selectByEnterprise_id(int Enterprise_id) {
        String sql="select * from enterprise where enterprice_id";
        return (Enterprise) (db.selectinfo(sql,Enterprise.class,Enterprise_id).get(0));
    }
}
